package org.sepheriel.airy2d.physic;

import org.sepheriel.airy2d.entity.Entity;

public class PMath {
	
	public PMath(int delta) {
	}
	
	public void calcSpeed(Entity e, int delta) {
		if(e.getSpeed() < e.getMaxSpeed()) {
			System.out.println((e.getSpeed()+e.getAcceleration()+1)*delta);
			e.setSpeed((int) ((e.getSpeed()+e.getAcceleration()+1)*delta));
			System.out.println(e.getSpeed());
		}
	}

}
